package com.linuxone.news.server;

import java.util.Map;
import java.util.List;

import com.google.gwt.user.server.rpc.RemoteServiceServlet;
import com.linuxone.news.NewsThread;
import com.linuxone.news.client.NewsService;
import com.linuxone.news.yahoo.YahooNewsParser;
import com.linuxone.news.yahoo.YahooTodayNews;

public class NewsServiceImpl extends RemoteServiceServlet implements NewsService {

	private static final long serialVersionUID = -7142291639344366592L;

	@Override
	public Map<String, NewsThread> getNewsThread() {
		YahooTodayNews news = new YahooNewsParser().parse();
		return news.getAllNewsThread();
	}

	@Override
	public List<NewsThread> getNewsThreadinList() {
		YahooTodayNews news = new YahooNewsParser().parse();
		return news.getAllNewsThreadinList();
	}
	
	

}
